<?php
/**
 * Created by PhpStorm.
 * User: fangwei
 * Date: 2019-07-03
 * Time: 22:51
 */

namespace App\Http\Requests\Admin;


use Illuminate\Foundation\Http\FormRequest;

class HouseInputDTO extends FormRequest
{
    public function authorize()
    {
        return true;
    }

    public function rules()
    {
        return [
            'name' => 'required|max:40',
            'tel' => 'max:20',
            'contact' => 'max:40',
            'head' => 'max:40',
            'address' => 'max:200',
            'mark' => 'max:1000',

        ];
    }

    public function messages()
    {
        return [
            'name.required' => '仓库名称必须填写',
            'name.max' => '仓库名称不能超过40个字符',
            'tel.max' => '联系方式不能超过20个字符',
            'contact.max' => '联系人不能超过20个字符',
            'head.max' => '负责人不能超过20个字符',
            'address.max' => '地址不能超过200个字符',
            'mark.max' => '备注不能超过1000个字符',
        ];
    }
}